/******************************************************************************
** 
** Copies of chars.
** 
** File name:	chars_copy.c
** Compilation:	cc chars_copy.c -o chars_copy
** Execution:	./chars_copy
** 
** Description:
** 1. Expecting one char, printing the "!=" result, 0 or 1 (1 if got EOF).
** 2. Printing the digital value of EOF ("-1").
** 3. Copying input stream chars to the output.
** 
******************************************************************************/
#include <stdio.h>

main()
{
    int c;
    
    c = getchar() != EOF;
    printf("getchar() != EOF is %d\n", c);
    
    printf("EOF = %d\n", EOF);
    
    while ((c = getchar()) != EOF) {
        putchar(c);
    }
}

